package cn.pn.project.client.base;

import cn.pn.project.pojo.base.Img;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name="pn-base-provider")
public interface ImgFeign {
    /**
     * 添加图片
     * @param img
     * @return
     * @throws Exception
     */
    @RequestMapping("/img/addImg")
    Integer addImg(@RequestBody Img img) throws Exception;

    /**
     * 修改图片关联id
     * @param releId 关联id
     * @param imgId 图片id
     * @return
     * @throws Exception
     */
    @RequestMapping("/img/updateReleId")
    Integer updateReleId(@RequestParam("releId") Integer releId, @RequestParam("imgId") Integer imgId) throws Exception;

    /**
     * 获得最大主键
     * @return
     * @throws Exception
     */
    @RequestMapping("/img/max")
    Integer getMaxId() throws Exception;
}
